import unittest
from htmltestreport import HTMLTestReport
from config import BASE_DIR
from common.log_cfg import init_log_config

if __name__ == '__main__':
    # 调用日志配置的函数
    init_log_config(BASE_DIR + '/log/ihrm.log')
    suite = unittest.defaultTestLoader.discover(BASE_DIR + '/scripts', 'test*')
    report = HTMLTestReport(BASE_DIR + '/report/ihrm_login.html', '人力资源登陆测试报告', 'v1.0')
    report.run(suite)
